package switchviz.util;

import java.util.StringTokenizer;

public class StringUtil
{
	public static String[] tokenize(String str, String delim)
	{
		StringTokenizer tokenizer = new StringTokenizer(str, delim);
		
		int count = tokenizer.countTokens();
		String[] array = new String[count];
		
		for (int i = 0; i < count; ++i)
			array[i] = tokenizer.nextToken();
		
		return array;
	}
}
